package sim

import (
	"github.com/gogf/gf/v2/frame/g"
	"github.com/sagoo-cloud/sagooiot/api/v1/common"
)

// GetSimFactoryListReq 获取数据列表
type GetSimFactoryListReq struct {
	g.Meta `path:"/sim_factory/list" method:"get" summary:"获取厂商管理列表" tags:"物联网卡管理"`
	common.PaginationReq
}
type GetSimFactoryListRes struct {
	Data []GetSimFactoryByIdRes
	common.PaginationRes
}

// GetSimFactoryByIdReq 获取指定ID的数据
type GetSimFactoryByIdReq struct {
	g.Meta `path:"/sim_factory/get" method:"get" summary:"获取厂商管理" tags:"物联网卡管理"`
	Id     int `json:"id"        description:"id" v:"required#id不能为空"`
}
type GetSimFactoryByIdRes struct {
	Id        string `json:"id"          description:""`
	AppKey    string `json:"appKey"          description:"app_key"`
	AppSecret string `json:"appSecret"          description:"app_secret"`
	Name      string `json:"name"          description:"账号名称"`
	UserId    string `json:"userId"          description:"用户id"`
	Remark    string `json:"remark"          description:"备注"`
	Types     string `json:"types"          description:"1电信,2联通,3移动"`
	Status    int    `json:"status"    description:"1启用,0禁用"`
	RestUrl   string `json:"restUrl" description:"接口地址"` // 接口地址
	Password  string `json:"password" description:"密码"`  // 密码
	CreatedAt string `json:"createdAt"          description:""`
	UpdatedAt string `json:"updatedAt"          description:""`
}

// AddSimFactoryReq 添加数据
type AddSimFactoryReq struct {
	g.Meta    `path:"/sim_factory/add" method:"post" summary:"添加厂商管理" tags:"物联网卡管理"`
	Types     string `json:"types"      v:"required#类型必填"      description:"1电信,2联通,3移动"`
	AppKey    string `json:"appKey"      v:"required#AppKey必填"      description:"app_key"`
	AppSecret string `json:"appSecret"         description:"app_secret"`
	Name      string `json:"name"     v:"required#账号名称必填"     description:"账号名称"`
	UserId    string `json:"userId"          description:"用户id"`
	Remark    string `json:"remark"          description:"备注"`
	Status    int    `json:"status"    description:"1启用,0禁用"`
	RestUrl   string `json:"restUrl" description:"接口地址"` // 接口地址
	Password  string `json:"password" description:"密码"`  // 密码
}
type AddSimFactoryRes struct{}

// EditSimFactoryReq 编辑数据api
type EditSimFactoryReq struct {
	g.Meta    `path:"/sim_factory/edit" method:"put" summary:"编辑厂商管理" tags:"物联网卡管理"`
	Status    int    `json:"status"    description:"1启用,0禁用"`
	Types     string `json:"types"      v:"required#类型必填"      description:"1电信,2联通,3移动"`
	AppKey    string `json:"appKey"      v:"required#AppKey必填"      description:"app_key"`
	AppSecret string `json:"appSecret"         description:"app_secret"`
	Name      string `json:"name"     v:"required#账号名称必填"     description:"账号名称"`
	UserId    string `json:"userId"          description:"用户id"`
	Remark    string `json:"remark"          description:"备注"`
	Id        string `json:"id"     v:"required#id必填"     description:""`
	RestUrl   string `json:"restUrl" description:"接口地址"` // 接口地址
	Password  string `json:"password" description:"密码"`  // 密码
}
type EditSimFactoryRes struct{}

// DeleteSimFactoryReq 删除数据
type DeleteSimFactoryReq struct {
	g.Meta `path:"/sim_factory/delete" method:"delete" summary:"删除厂商管理" tags:"物联网卡管理"`
	Ids    []int `json:"ids"        description:"ids" v:"required#ids不能为空"`
}
type DeleteSimFactoryRes struct{}

type SetStatusSimFactoryReq struct {
	g.Meta `path:"/sim_factory/status" method:"post" summary:"设置厂商状态" tags:"物联网卡管理"`
	Id     int `json:"id"        description:"id" v:"required#id不能为空"`
	Status int `json:"status"        description:"1启用 , 2禁用" v:"required#status不能为空"`
}
type SetStatusSimFactoryRes struct{}
